package com.swpu.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.swpu.seckill.pojo.SeckillOrder;
import com.swpu.seckill.pojo.User;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Oxygen
 * @since 2022-03-17
 */
public interface ISeckillOrderService extends IService<SeckillOrder> {

    /**
     * 保存秒杀订单信息
     * @param seckillOrder
     */
    void savaOrder(SeckillOrder seckillOrder);

    /**
     * 查询当前用户是否已经秒杀过该商品
     * @param userId
     * @param goodsId
     * @return
     */
    SeckillOrder selectSeckillOrder(Long userId, Long goodsId);

    Long getResult(User user, Long goodsId);
}
